package com.aynu.likou;

/**
 * @author mj
 * @create 2021-04-08 16:21
 * @describe:
 */
public class HuiWen {
    public static void main(String[] args) {
        System.out.println(isPalindrome(112321));
    }

    public static boolean isPalindrome(int x) {
        int yuan = x;
        if (x < 0) {
            return false;
        }
        int n = 0;
        while (x != 0) {
            n = n * 10 + x % 10;
            x /= 10;
        }
        return n == yuan;
    }
}
